#!/usr/bin/python3
# _*_ coding:utf-8 _*_
"""
try
"""


def foo(s):
    return 10 / int(s)


def bar(s):
    return foo(s) * 2


def main():
    a = 'q'
    try:
        print('try...')
        r = 10 / int(a)
        print(r)
    except ValueError as e:
        print('except:', e)
    except ZeroDivisionError as e:
        print('except:', e)
    else:
        print('no error!')
    finally:
        print('finally...')
    print('end')

    try:
        print(bar(a))
        print('try...')
    except Exception as e:
        print('error:', e)
    finally:
        print('finally...')


if __name__ == "__main__":
    main()
    print('end')
